<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- QCtmAbstractMessageTipModel.cpp -->
  <title>QCtmAbstractMessageTipModel Class | QCustomUi 1.10.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html">QCustomUi 1.10.0</a></li>
<li><a href="index.html">QCustomUi</a></li>
<li>QCtmAbstractMessageTipModel</li>
<li id="buildversion">QCustomUi 1.10.0 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#reimplemented-public-functions">Reimplemented Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QCtmAbstractMessageTipModel Class</h1>
<!-- $$$QCtmAbstractMessageTipModel-brief -->
<p>消息model接口类，定义消息model的基本接口，要定义自己的消息model可以继承自该类. <a href="#details">More...</a></p>
<!-- @@@QCtmAbstractMessageTipModel -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">  <span class="preprocessor">#include &lt;QCtmAbstractMessageTipModel.h&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="https://doc.qt.io/qt/qabstracttablemodel.html">QAbstractTableModel</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qctmmessagetipmodel.html">QCtmMessageTipModel</a></p>
</td></tr></table></div>
<ul>
<li><a href="qctmabstractmessagetipmodel-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qctmabstractmessagetipmodel.html#reversedOrder-prop">reversedOrder</a></b> : bool</li>
</ul>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#QCtmAbstractMessageTipModel">QCtmAbstractMessageTipModel</a></b>(QObject *<i>parent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#dtor.QCtmAbstractMessageTipModel">~QCtmAbstractMessageTipModel</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#addMessage">addMessage</a></b>(QCtmAbstractMessageTipDataPtr <i>msg</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#clear">clear</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#insertMessage">insertMessage</a></b>(int <i>index</i>, QCtmAbstractMessageTipDataPtr <i>msg</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#maximumCount">maximumCount</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmAbstractMessageTipDataPtr </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#message">message</a></b>(int <i>row</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#removeMessage">removeMessage</a></b>(QCtmAbstractMessageTipDataPtr <i>msg</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#reversedOrder">reversedOrder</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#setMaximumCount">setMaximumCount</a></b>(int <i>count</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#setReversedOrder">setReversedOrder</a></b>(bool <i>re</i>)</td></tr>
</table></div>
<h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#insertRows">insertRows</a></b>(int <i>row</i>, int <i>count</i>, const QModelIndex &amp;<i>parent</i> = QModelIndex()) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#removeRows">removeRows</a></b>(int <i>row</i>, int <i>count</i>, const QModelIndex &amp;<i>parent</i> = QModelIndex()) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qctmabstractmessagetipmodel.html#rowCount">rowCount</a></b>(const QModelIndex &amp;<i>parent</i> = QModelIndex()) const override</td></tr>
</table></div>
<!-- $$$QCtmAbstractMessageTipModel-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
</div>
<!-- @@@QCtmAbstractMessageTipModel -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$reversedOrder-prop$$$reversedOrder$$$setReversedOrderbool -->
<h3 class="fn" id="reversedOrder-prop"><span class="name">reversedOrder</span> : <span class="type">bool</span></h3>
<p>消息是否逆序显示，即最新一条消息显示在第一条，默认为真.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmabstractmessagetipmodel.html#reversedOrder">reversedOrder</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmabstractmessagetipmodel.html#setReversedOrder">setReversedOrder</a></b></span>(bool <i>re</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qctmabstractmessagetipmodel.html#setReversedOrder">setReversedOrder</a> and <a href="qctmabstractmessagetipmodel.html#reversedOrder">reversedOrder</a>.</p>
<!-- @@@reversedOrder -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCtmAbstractMessageTipModel[overload1]$$$QCtmAbstractMessageTipModelQObject* -->
<h3 class="fn" id="QCtmAbstractMessageTipModel">QCtmAbstractMessageTipModel::<span class="name">QCtmAbstractMessageTipModel</span>(<span class="type"><a href="https://doc.qt.io/qt/qobject.html#QObject">QObject</a></span> *<i>parent</i>)</h3>
<p>构造一个父对象为 <i>parent</i> 的消息对象.</p>
<!-- @@@QCtmAbstractMessageTipModel -->
<!-- $$$~QCtmAbstractMessageTipModel[overload1]$$$~QCtmAbstractMessageTipModel -->
<h3 class="fn" id="dtor.QCtmAbstractMessageTipModel"><code>[virtual] </code>QCtmAbstractMessageTipModel::<span class="name">~QCtmAbstractMessageTipModel</span>()</h3>
<p>销毁当前消息model对象.</p>
<!-- @@@~QCtmAbstractMessageTipModel -->
<!-- $$$addMessage[overload1]$$$addMessageQCtmAbstractMessageTipDataPtr -->
<h3 class="fn" id="addMessage"><span class="type">void</span> QCtmAbstractMessageTipModel::<span class="name">addMessage</span>(<span class="type">QCtmAbstractMessageTipDataPtr</span> <i>msg</i>)</h3>
<p>添加一条消息 <i>msg</i>.</p>
<p><b>See also </b><a href="qctmabstractmessagetipmodel.html#insertMessage">insertMessage</a> and <a href="qctmabstractmessagetipmodel.html#removeMessage">removeMessage</a>.</p>
<!-- @@@addMessage -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn" id="clear"><span class="type">void</span> QCtmAbstractMessageTipModel::<span class="name">clear</span>()</h3>
<p>清除所有消息对象.</p>
<!-- @@@clear -->
<!-- $$$insertMessage[overload1]$$$insertMessageintQCtmAbstractMessageTipDataPtr -->
<h3 class="fn" id="insertMessage"><span class="type">void</span> QCtmAbstractMessageTipModel::<span class="name">insertMessage</span>(<span class="type">int</span> <i>index</i>, <span class="type">QCtmAbstractMessageTipDataPtr</span> <i>msg</i>)</h3>
<p>在 <i>index</i> 的位置插入一条消息对象 <i>msg</i>.</p>
<p><b>See also </b><a href="qctmabstractmessagetipmodel.html#addMessage">addMessage</a> and <a href="qctmabstractmessagetipmodel.html#removeMessage">removeMessage</a>.</p>
<!-- @@@insertMessage -->
<!-- $$$insertRows[overload1]$$$insertRowsintintconstQModelIndex& -->
<h3 class="fn" id="insertRows"><code>[override virtual] </code><span class="type">bool</span> QCtmAbstractMessageTipModel::<span class="name">insertRows</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>count</i>, const <span class="type"><a href="https://doc.qt.io/qt/qmodelindex.html">QModelIndex</a></span> &amp;<i>parent</i> = QModelIndex())</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qabstractitemmodel.html#insertRows">QAbstractItemModel::insertRows</a>(int row, int count, const QModelIndex &amp;parent).</p>
<!-- @@@insertRows -->
<!-- $$$maximumCount[overload1]$$$maximumCount -->
<h3 class="fn" id="maximumCount"><span class="type">int</span> QCtmAbstractMessageTipModel::<span class="name">maximumCount</span>() const</h3>
<p>返回消息最大保存对象.</p>
<p><b>See also </b><a href="qctmabstractmessagetipmodel.html#setMaximumCount">setMaximumCount</a>.</p>
<!-- @@@maximumCount -->
<!-- $$$message[overload1]$$$messageint -->
<h3 class="fn" id="message"><span class="type">QCtmAbstractMessageTipDataPtr</span> QCtmAbstractMessageTipModel::<span class="name">message</span>(<span class="type">int</span> <i>row</i>) const</h3>
<p>返回第 <i>row</i> 行的消息对象.</p>
<!-- @@@message -->
<!-- $$$removeMessage[overload1]$$$removeMessageQCtmAbstractMessageTipDataPtr -->
<h3 class="fn" id="removeMessage"><span class="type">void</span> QCtmAbstractMessageTipModel::<span class="name">removeMessage</span>(<span class="type">QCtmAbstractMessageTipDataPtr</span> <i>msg</i>)</h3>
<p>从消息model中移除消息对象 <i>msg</i>.</p>
<p><b>See also </b><a href="qctmabstractmessagetipmodel.html#addMessage">addMessage</a> and <a href="qctmabstractmessagetipmodel.html#insertMessage">insertMessage</a>.</p>
<!-- @@@removeMessage -->
<!-- $$$removeRows[overload1]$$$removeRowsintintconstQModelIndex& -->
<h3 class="fn" id="removeRows"><code>[override virtual] </code><span class="type">bool</span> QCtmAbstractMessageTipModel::<span class="name">removeRows</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>count</i>, const <span class="type"><a href="https://doc.qt.io/qt/qmodelindex.html">QModelIndex</a></span> &amp;<i>parent</i> = QModelIndex())</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qabstractitemmodel.html#removeRows">QAbstractItemModel::removeRows</a>(int row, int count, const QModelIndex &amp;parent).</p>
<!-- @@@removeRows -->
<!-- $$$reversedOrder -->
<h3 class="fn" id="reversedOrder"><span class="type">bool</span> QCtmAbstractMessageTipModel::<span class="name">reversedOrder</span>() const</h3>
<p>消息是否逆序显示，即最新一条显示在第一条，默认为真.</p>
<p><b>Note: </b>Getter function for property reversedOrder. </p>
<p><b>See also </b><a href="qctmabstractmessagetipmodel.html#setReversedOrder">setReversedOrder</a>.</p>
<!-- @@@reversedOrder -->
<!-- $$$rowCount[overload1]$$$rowCountconstQModelIndex& -->
<h3 class="fn" id="rowCount"><code>[override virtual] </code><span class="type">int</span> QCtmAbstractMessageTipModel::<span class="name">rowCount</span>(const <span class="type"><a href="https://doc.qt.io/qt/qmodelindex.html">QModelIndex</a></span> &amp;<i>parent</i> = QModelIndex()) const</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qabstractitemmodel.html#rowCount">QAbstractItemModel::rowCount(const QModelIndex &amp;parent) const</a>.</p>
<!-- @@@rowCount -->
<!-- $$$setMaximumCount[overload1]$$$setMaximumCountint -->
<h3 class="fn" id="setMaximumCount"><span class="type">void</span> QCtmAbstractMessageTipModel::<span class="name">setMaximumCount</span>(<span class="type">int</span> <i>count</i>)</h3>
<p>设置消息最大保存数量 <i>count</i>.</p>
<p><b>See also </b><a href="qctmabstractmessagetipmodel.html#maximumCount">maximumCount</a>().</p>
<!-- @@@setMaximumCount -->
<!-- $$$setReversedOrder -->
<h3 class="fn" id="setReversedOrder"><span class="type">void</span> QCtmAbstractMessageTipModel::<span class="name">setReversedOrder</span>(<span class="type">bool</span> <i>re</i>)</h3>
<p>设置消息是否逆序显示 <i>re</i>, 即最新一条显示在第一条，默认为真.</p>
<p><b>Note: </b>Setter function for property <a href="qctmabstractmessagetipmodel.html#reversedOrder">reversedOrder</a>. </p>
<p><b>See also </b><a href="qctmabstractmessagetipmodel.html#reversedOrder">reversedOrder</a>.</p>
<!-- @@@setReversedOrder -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> QCustomUi
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/> </div>
</body>
</html>
